/* Same as drawPhaser, only draws them in black */
{
int i;
NXPoint *from, *to;
for(i=0;i<[theWeaponList count];i++) {
from=[[theWeaponList objectAt:i] from];
to=[[theWeaponList objectAt:i] to];
PSsetgray(0);
PSmoveto(from->x+8, from->y+8);
PSlineto(to->x+8, to->y+8);
[[theWeaponList removeObjectAt:i] free];
};
PSstroke();
PSflushgraphics();
return self;
}
- shootPhaser
/* Picks a ship at random (the "shooter") then finds the closest enemy. Then we create an instance of Weapon, add it to theWeaponList, and tell that ship to take some damage */